home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume20 / log_archie / patch01 next >
Encoding:
Text File  |  1991-05-21  |  1.9 KB  |  45 lines

  1. Newsgroups: comp.sources.misc
  2. From: Dan Kegel <dank@blacks.jpl.nasa.gov>
  3. Subject:  v20i007:  log_archie - Script for easy access to Archie, Patch01
  4. Message-ID: <1991May22.040301.16686@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 26029786cec321c65a36c648bfc53419
  6. Date: Wed, 22 May 1991 04:03:01 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Dan Kegel <dank@blacks.jpl.nasa.gov>
  10. Posting-number: Volume 20, Issue 7
  11. Archive-name: log_archie/patch01
  12. Patch-To: log_archie: Volume 19, Issue 63
  13.  
  14. The awk script supplied in log_archie neglects to print the year
  15. part of each file's timestamp.  A patch to postarchie.awk follows.
  16.  
  17. Dan 
  18. -----
  19. *** old.postarchie    Tue May 21 22:48:28 1991
  20. --- postarchie.awk    Tue May 21 22:51:27 1991
  21. ***************
  22. *** 3,10 ****
  23.   # Output format is
  24.   #  hostname    directory    filename    size    date
  25.   # padded with many tabs.
  26. ! # You WILL run into a bug in SunOS<=4.1.1b's sort utility if you run this stuff
  27. ! # through 'sort +2'; sort fails to ignore whitespace properly.
  28.   /^Host / {host=$2 substr("\t\t\t\t\t\t", 1, (47-length($2))/8); next}
  29.   /^ *Location:/ {dir=$2 substr("\t\t\t\t\t\t\t\t", 1, (63-length($2))/8); next}
  30. ! /^ *FILE/ { print host dir $7 substr("\t\t\t\t", 1, (31-length($7))/8) $3 " " $4 " " $5; next}
  31. --- 3,9 ----
  32.   # Output format is
  33.   #  hostname    directory    filename    size    date
  34.   # padded with many tabs.
  35. ! # Note: On SunOS, sort +2 fails on this scripts' output; use sort -b +2 instead.
  36.   /^Host / {host=$2 substr("\t\t\t\t\t\t", 1, (47-length($2))/8); next}
  37.   /^ *Location:/ {dir=$2 substr("\t\t\t\t\t\t\t\t", 1, (63-length($2))/8); next}
  38. ! /^ *FILE/ { print host dir $7 substr("\t\t\t\t", 1, (31-length($7))/8) $3 " " $4 " " $5 " " $6; next}
  39. exit 0 # Just in case...
  40. -- 
  41. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  42. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  43. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  44. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  45.